import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/page/layout'
import Centre from '@/page/centre'
import Login from '@/page/login'
import Register from '@/page/register'
import User from '@/view/user'
import Post from '@/view/post'
import Knowledge from '@/view/knowledge'
import Bicycle from '@/view/bicycle'

Vue.use(Router)

export default new Router({
	routes: [{
			path: '/',
			name: 'Login',
			component: Login
		},
		{
			path: '/register',
			name: 'register',
			component: Register
		}, {
			path: '/',
			name: 'Layout',
			component: Layout,
			children: [{
					path: '/home',
					name: 'Centre',
					component: Centre
				},
				{
					path: '/user',
					name: 'User',
					component: User
				},
				{
					path: '/post',
					name: 'Post',
					component: Post
				},
				{
					path: '/knowledge',
					name: 'Knowledge',
					component: Knowledge
				},
				{
					path: '/bicycle',
					name: 'Bicycle',
					component: Bicycle
				},
			]
		},
	]
})